<template>
  <div id="app">
    <div id="nav">
      <Loading v-show="loading" />
      <router-link to="/">Home</router-link> |
      <router-link to="/about">About</router-link>
    </div>
    <router-view />
  </div>
</template>

<script>
import Loading from '@/components/Loading.vue';
import { mapState } from 'vuex';

export default {
  components: {
    Loading,
  },
  computed: {
    ...mapState({
      loading: s => s.loading,
    }),
  },
};
</script>

<style lang="less">
@import url('./style/App.css');
</style>
